package com.myown.controller;


import com.myown.pojo.User;
import com.myown.rabbitmq.MQSender;
import com.myown.vo.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hardy
 * @since 2022-05-16
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private MQSender mqSender;

    //用户信息（测试）
    @RequestMapping("/info")
    @ResponseBody
    public RespBean info(User user){
        return RespBean.success(user);
    }
//
////    //消息队列发送消息（测试）
////    @RequestMapping("/mq")
////    @ResponseBody
////    public void mq(){
////        mqSender.send("helloFuck");
////    }
//
//    @RequestMapping("/mq/topic01")
//    @ResponseBody
//    public void mq03(){
//        mqSender.send03("hello,red");
//    }
//
//    @RequestMapping("/mq/topic02")
//    @ResponseBody
//    public void mq04(){
//        mqSender.send04("hello,green");
//    }
}
